package com.jctrip.hotel.source.client;

import com.jctrip.hotel.source.model.hworld.req.HworldAddUserReq;
import com.jctrip.hotel.source.model.hworld.req.HworldDeleteUserReq;
import com.jctrip.hotel.source.model.hworld.req.HworldModifyUserReq;
import com.jctrip.hotel.source.model.hworld.req.HworldQueryUserReq;
import com.jctrip.hotel.source.model.hworld.resp.HworldQueryUserResp;
import com.jctrip.hotel.source.model.hworld.resp.HworldResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author：Haruhi
 * @description:
 * @Date：2023/12/28 13:49
 * @Package：com.jctrip.hotel.source.client
 * @Project：hotel-main
 */
@FeignClient(name = "HworldH5Client", url = "${feign.url.hworldh5}")
@RequestMapping(headers = {"accept=application/json", "Content-Type=application/json;charset=UTF-8","Accept-Encoding=gzip, deflate"})
public interface HworldH5Client {
    @PostMapping("/userInfo/addUser")
    HworldResult<Boolean> addUser(@RequestHeader("Authorization") String token,
                                            @RequestBody HworldAddUserReq req);

    @PostMapping("/userInfo/modifyUser")
    HworldResult<Boolean> modifyUser(@RequestHeader("Authorization") String token,
                              @RequestBody HworldModifyUserReq req);

    @PostMapping("/userInfo/deleteUser")
    HworldResult<Boolean> deleteUser(@RequestHeader("Authorization") String token,
                              @RequestBody HworldDeleteUserReq req);

    @PostMapping("/userInfo/queryUser")
    HworldResult<HworldQueryUserResp> queryUser(@RequestHeader("Authorization") String token,
                                                @RequestBody HworldQueryUserReq req);
}
